Download Random Combinations and Permutations.nlogo (48 KB)

Random Combinations and Permutations

Random Combinations and Permutations is authored in the NetLogo modeling-and-simulation environment. The model is part of ProbLab, a curricular unit designed to enrich student understanding of the domain. The online unit package will include a suite of models, student worksheets, and a teacher guide. Below is an applet of Stochastic Cryptology. You can interact with this model by changing the slider values and then pressing Rerun to run this model under different settings. For more details, please see the model itself in the NetLogo library. Note that this model is still under development and is yet to undergo our rigorous checkout procedure.


CM ProbLab: Random Combinations and Permutations -- Combinations, permutations, and their relationships
Don't see nothin'?

Gist

Random Combinations and Permutations invites you to set up a secret combination and then see how long it takes the computer to find it. That's when SINGLE-SUCCESS is set to 'On.' Follow the instructions at the top of the model applet. If you set SINGLE-SUCCESS to 'Off,' then the program will keep track of how many times or how often it finds the combination. The histogram grows to show you how many times the combination is found out of each sample of 1,000 attempts. You can change the size of the sample, and you can change the histogram to a graph. Also, you can work with dice instead of colors. You can even change the height and width of the array to work with more or less squares.
There is a multiple-choice widget called ANALYSIS-TYPE This controls whether or not we care for the order of the colors or the dice in the combination you created. For instance, if you create a dice combination "1, 2, 3," then if ANALYSIS-TYPE is set to "Combinations," only "1, 2, 3" will be accepted as a 'find.' But if ANALYSIS-TYPE is set to "Permutation," then "3, 1, 2" will be accepted as a find. So will "1, 3, 2" (what else)? In any case, the program keeps track of how many times it finds the combination in the correct and in the incorrect order. So what does that multiple-choice button do? It governs whether or not you'll see these results being plotted. If you set the choice button to "Both," then both types of event will be recorded.

Questions to Ponder

[Last updated April 7, 2005]